package com.zy.xuanwo.acitivity;

import android.content.Intent;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.widget.Button;

import com.zhy.http.okhttp.OkHttpUtils;
import com.zy.xuanwo.R;
import com.zy.xuanwo.bean.LoginToken;
import com.zy.xuanwo.utils.MD5Utils;
import com.zy.xuanwo.utils.SharedPreferencesUtils;
import com.zy.xuanwo.utils.URLConstants;
import com.zy.xuanwo.utils.UserInfoSPManager;

import butterknife.Bind;
import butterknife.ButterKnife;
import butterknife.OnClick;

/**
 * Created by njb on 2016/7/17.
 */
public class ConfiguringActivity extends AppCompatActivity {


    @Bind(R.id.btn_cancle)
    Button btnCancle;
    private String userToken;
    private String bindKey;
    private String devip;
    private String username;

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_configuring);
        ButterKnife.bind(this);
        bindingDev();
        requestdevices();
    }

    private void bindingDev() {
        userToken = UserInfoSPManager.getUserToken();
        bindKey = MD5Utils.MD5Encode(devip + userToken);

    }

    private void requestdevices() {
//        OkHttpUtils.post().url(URLConstants.DEVICES_URL)
//                .addParams("")

    }


    @OnClick(R.id.btn_cancle)
    public void onClick(View v) {
        switch (v.getId()){
            case R.id.btn_cancle:
                startActivity(new Intent(ConfiguringActivity.this,ConfigurationWiFiActivity.class));
                this.finish();
                break;
        }
    }
}
